package main

import (
	"fmt"
	"gitee.com/jinmingzhi/eth-learn/pkg/ethtool"
)

func main() {
	c1, _ := ethtool.NewCredential()
	fmt.Println("address:", c1.Address.Hex())
	fmt.Println("private key:",c1.PrivateKeyHex())
	fmt.Println("public key:",c1.PublicKeyHex())

	// 导入私钥生产
	c2, _ := ethtool.HexToCredential("0x45c418fbe5c252381bf1699d348362d12fc560c01f1be3dd9c576e6e6475caf6")
	fmt.Println("address:", c2.Address.Hex())
	fmt.Println("private key:",c2.PrivateKeyHex())
	fmt.Println("public key:",c2.PublicKeyHex())

}
